package com.akk.module.avs.service;

import com.akk.module.avs.entity.AvsPayVipConfig;
import com.akk.module.avs.entity.AvsPayVipConfigExample;
import com.akk.module.avs.mapper.AvsPayVipConfigMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AvsPayVipConfigService {

    @Autowired
    private AvsPayVipConfigExample avsPayVipConfigExample;

    @Autowired
    private AvsPayVipConfigMapper avsPayVipConfigMapper;

    public List<AvsPayVipConfig> selectAll(){
        avsPayVipConfigExample.clear();
        avsPayVipConfigExample.createCriteria();
        return avsPayVipConfigMapper.selectByExample(avsPayVipConfigExample);
    }

    public AvsPayVipConfig findById(Long id){
        return avsPayVipConfigMapper.selectByPrimaryKey(id);
    }

    public void update(AvsPayVipConfig config){
        avsPayVipConfigMapper.updateByPrimaryKey(config);
    }

    public void save(AvsPayVipConfig config){
        avsPayVipConfigMapper.insert(config);
    }

}
